import request from '@/utils/request'
/**
 *
 * @returns promise
 */
export const getChannelAPI = () =>
  request({
    url: '/v1_0/user/channels'
  })
export const getAllChannelsAPI = () =>
  request({
    url: '/v1_0/channels'
  })
export const delChannelsAPI = (id) =>
  request({
    url: `/v1_0/user/channels/${id}`,
    method: 'DELETE'
  })
export const addChannelsAPI = (id, seq) =>
  request({
    url: '/v1_0/user/channels',
    method: 'PATCH',
    data: {
      channels: [
        {
          id,
          seq
        }
      ]
    }
  })
